home *** CD-ROM | disk | FTP | other *** search
- /* p897.c --- bible */
- #include <conio.h>
- main()
- {
- int oldmode;
- struct text_info t_info;
- gettextinfo(&t_info);
- oldmode = t_info.currmode;
- if(oldmode == MONO)
- {
- cputs("Monochrome mode: Cannot switch to any other mode.");
- }
- if(oldmode == C40 || oldmode == C80)
- {
- cputs("Color mode \n\r");
- cputs("Press a key to switch mode \n\r");
- getch();
- if(oldmode == C40)
- textmode(C80);
- if(oldmode == C80)
- textmode(C40);
- cputs("Press any key to return to the previous mode");
- getch();
- textmode(oldmode);
- }
- if(oldmode == BW40 || oldmode == BW80)
- {
- cputs("Black and white mode\n\r");
- cputs("Press a key to switch mode\n\r");
- getch();
- if(oldmode == BW40)
- textmode(BW80);
- if(oldmode == BW80)
- textmode(BW40);
- cputs("Press any key to return to the previous mode");
- getch();
- textmode(oldmode);
- }
- getch();
- }